﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Matrix.aspx.cs" Inherits="demo.Pages.Matrix" %>

<%@ Register Assembly="Water" Namespace="Water.Web.Controls" TagPrefix="page" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <page:ObjectDataSource ID="ObjectDataSource1" runat="server" TypeName="demo.Objects.BLL.Score" CanSelect="true" MatrixColumnField="coursename,courseid"
            MatrixColumnSortExpress="courseid" GroupField="studentid,studentname" SummaryType="Sum" EnablePaging="true" ValueField="score">
        </page:ObjectDataSource>
        <br />
        <page:Container ID="Container1" runat="server" Promptable="false"  PackageType="Div" TitleTextPrompt="score.title">
        <ItemTemplate>
        <page:ListView ID="ListView1" runat="server" DataSourceID="ObjectDataSource1" AutoQuery="true" ShowFooter="true">
            <Columns>
                <page:BoundField DataField="studentid" HeaderPrompt="student.studentid" HeaderStyle-Width="60">
                </page:BoundField>
                <page:BoundField DataField="studentname" HeaderPrompt="student.studentname" HeaderStyle-Width="80">
                </page:BoundField>
                <page:BoundField DataField="studentname" MatrixColumn="true" SummaryFunction="Max" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right"
                    FooterStyle-HorizontalAlign="Right" ItemStyle-ForeColor="Blue" NullDisplayText="缺考" HeaderStyle-Width="100">
                </page:BoundField>
            </Columns>
            <PagerTemplate>
                <page:DataPager ID="dp1" runat="server" PageSize="5" PagedControlID="ListView1" QueryTarget="ListView1" IsCallBack="true" />
            </PagerTemplate>
        </page:ListView>
        </ItemTemplate>
        </page:Container>
    </div>
    </form>
</body>
</html>
